package com.example.javaairportflightanalysis.dao;

import com.example.javaairportflightanalysis.domin.HomePageNonstop;
import com.example.javaairportflightanalysis.domin.HomePageTransfer;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface HomePageMapepr {
    @Select("select DISTINCT DA.*,\n" +
            "DDD.FETT,\n" +
            "DDD.IARS,\n" +
            "DFRD.FRTT,\n" +
            "DCD.ABST\n" +
            "from zbtj.DFDL_A DA\n" +
            "left JOIN zbtj.\"DFME_DLYE_DFLT\" DDD ON DA.DFLT_FLID=DDD.FLID \n" +
            "left join zbtj.\"DFME_CANE_DFLT\" DCD ON DCD.FLID=DA.DFLT_FLID\n" +
            "left JOIN zbtj.\"DFME_FRTT_DFLT\" DFRD ON DFRD.FLID=DA.DFLT_FLID")
    List<HomePageNonstop> selectAllNonstopA();

    @Select("select DISTINCT DA.*,\n" +
            "DDD.FETT,\n" +
            "DDD.IARS,\n" +
            "DFRD.FRTT,\n" +
            "DCD.ABST\n" +
            "from zbtj.TRANSFER_A DA\n" +
            "left JOIN zbtj.\"DFME_DLYE_DFLT\" DDD ON DA.DFLT_FLID=DDD.FLID \n" +
            "left join zbtj.\"DFME_CANE_DFLT\" DCD ON DCD.FLID=DA.DFLT_FLID\n" +
            "left JOIN zbtj.\"DFME_FRTT_DFLT\" DFRD ON DFRD.FLID=DA.DFLT_FLID")
    List<HomePageTransfer> selectAllTransferA();

    @Select("SELECT DISTINCT DA.*,\n" +
            "                DDD.FETT,\n" +
            "                DDD.IARS,\n" +
            "                MDC.FCDP,\n" +
            "                GTG.CODE,\n" +
            "                DFRD.FRTT,\n" +
            "                DCD.ABST\n" +
            "FROM zbtj.DFDL_D DA\n" +
            "LEFT JOIN zbtj.\"DFME_DLYE_DFLT\" DDD ON DA.DFLT_FLID = DDD.FLID\n" +
            "LEFT JOIN zbtj.\"DFME_FRTT_DFLT\" DFRD ON DA.DFLT_FLID = DFRD.FLID\n" +
            "LEFT JOIN zbtj.\"VW_META_DFME_CKLS\" MDC ON DA.DFLT_FLID = MDC.FLID\n" +
            "left join zbtj.\"DFME_CANE_DFLT\" DCD ON DCD.FLID=DA.DFLT_FLID\n" +
            "LEFT JOIN zbtj.\"VW_GTLS_DFLT_GATE\" GTG ON DA.DFLT_FLID = GTG.FLID")
    List<HomePageNonstop> selectAllNonstopD();

    @Select("SELECT DISTINCT DA.*,\n" +
            "                DDD.FETT,\n" +
            "                DDD.IARS,\n" +
            "                MDC.FCDP,\n" +
            "                GTG.CODE,\n" +
            "                DFRD.FRTT,\n" +
            "                DCD.ABST\n" +
            "FROM zbtj.TRANSFER_D DA\n" +
            "LEFT JOIN zbtj.\"DFME_DLYE_DFLT\" DDD ON DA.DFLT_FLID = DDD.FLID\n" +
            "LEFT JOIN zbtj.\"DFME_FRTT_DFLT\" DFRD ON DA.DFLT_FLID = DFRD.FLID\n" +
            "LEFT JOIN zbtj.\"VW_META_DFME_CKLS\" MDC ON DA.DFLT_FLID = MDC.FLID\n" +
            "left join zbtj.\"DFME_CANE_DFLT\" DCD ON DCD.FLID=DA.DFLT_FLID\n" +
            "LEFT JOIN zbtj.\"VW_GTLS_DFLT_GATE\" GTG ON DA.DFLT_FLID = GTG.FLID")
    List<HomePageTransfer> selectAllTransferD();
}
